package com.jutixueyuan.controller;

import com.jutixueyuan.pojo.LivegoodsResult;
import com.jutixueyuan.service.PassportService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class PassportController {

    @Autowired
    private PassportService passportService;

    @RequestMapping("/sendyzm")
    public LivegoodsResult sendyzm(String phone){
        LivegoodsResult result = passportService.sendVerifyCode(phone);

        return result;
    }

    @RequestMapping("/login")
    public LivegoodsResult login(String username,String password){
        LivegoodsResult reulst = passportService.login(username,password);
        return reulst;
    }
}
